# eric7.VCS.ProjectBrowserHelper

Module implementing the base class of the VCS project browser helper.

### Global Attributes

None

### Classes

VcsProjectBrowserHelper | Class implementing the base class of the VCS project browser helper.

### Functions

None

## VcsProjectBrowserHelper

Class implementing the base class of the VCS project browser helper.

### Derived from

QObject

### Class Attributes

None

### Class Methods

None

### Methods

VcsProjectBrowserHelper | Constructor
_VCSAdd | Protected slot called by the context menu to add the selected file to the VCS repository.
_VCSAddTree | Protected slot called by the context menu.
_VCSCommit | Protected slot called by the context menu to commit the changes to the VCS repository.
_VCSDiff | Protected slot called by the context menu to show the difference of a file/directory to the repository.
_VCSInfoDisplay | Protected slot called to show some vcs information.
_VCSLogBrowser | Protected slot called by the context menu to show the log browser for a file.
_VCSMerge | Protected slot called by the context menu to merge changes into to a file.
_VCSRemove | Protected slot called by the context menu to remove the selected file from the VCS repository.
_VCSRevert | Protected slot called by the context menu to revert changes made to a file.
_VCSStatus | Protected slot called by the context menu to show the status of a file.
_VCSUpdate | Protected slot called by the context menu to update a file from the VCS repository.
_updateVCSStatus | Protected method to update the VCS status of an item.
addVCSMenus | Public method to add the VCS entries to the various project browser menus.
showContextMenu | Public slot called before the context menu is shown.
showContextMenuDir | Public slot called before the context menu is shown.
showContextMenuDirMulti | Public slot called before the context menu is shown.
showContextMenuMulti | Public slot called before the context menu (multiple selections) is shown.

### Static Methods

None

#### VcsProjectBrowserHelper (Constructor)

VcsProjectBrowserHelper(vcsObject, browserObject, projectObject, isTranslationsBrowser, parent=None, name=None, )

Constructor

vcsObject (VersionControl)
  reference to the vcs object
browserObject (ProjectBaseBrowser)
  reference to the project browser object
projectObject (Project)
  reference to the project object
isTranslationsBrowser (bool)
  flag indicating, the helper is requested for the translations browser (this needs some special treatment)
parent (QWidget)
  parent widget
name (str)
  name of this object

#### VcsProjectBrowserHelper._VCSAdd

_VCSAdd()

Protected slot called by the context menu to add the selected file to the VCS repository.

#### VcsProjectBrowserHelper._VCSAddTree

_VCSAddTree()

Protected slot called by the context menu.

It is used to add the selected directory tree to the VCS repository.

#### VcsProjectBrowserHelper._VCSCommit

_VCSCommit()

Protected slot called by the context menu to commit the changes to the VCS repository.

#### VcsProjectBrowserHelper._VCSDiff

_VCSDiff()

Protected slot called by the context menu to show the difference of a file/directory to the repository.

#### VcsProjectBrowserHelper._VCSInfoDisplay

_VCSInfoDisplay()

Protected slot called to show some vcs information.

#### VcsProjectBrowserHelper._VCSLogBrowser

_VCSLogBrowser()

Protected slot called by the context menu to show the log browser for a file.

#### VcsProjectBrowserHelper._VCSMerge

_VCSMerge()

Protected slot called by the context menu to merge changes into to a file.

#### VcsProjectBrowserHelper._VCSRemove

_VCSRemove()

Protected slot called by the context menu to remove the selected file from the VCS repository.

#### VcsProjectBrowserHelper._VCSRevert

_VCSRevert()

Protected slot called by the context menu to revert changes made to a file.

#### VcsProjectBrowserHelper._VCSStatus

_VCSStatus()

Protected slot called by the context menu to show the status of a file.

#### VcsProjectBrowserHelper._VCSUpdate

_VCSUpdate()

Protected slot called by the context menu to update a file from the VCS repository.

#### VcsProjectBrowserHelper._updateVCSStatus

_updateVCSStatus(name)

Protected method to update the VCS status of an item.

name (str)
  filename or directoryname of the item to be updated

#### VcsProjectBrowserHelper.addVCSMenus

addVCSMenus(mainMenu, multiMenu, backMenu, dirMenu, dirMultiMenu)

Public method to add the VCS entries to the various project browser menus.

mainMenu (QMenu)
  reference to the main menu
multiMenu (QMenu)
  reference to the multiple selection menu
backMenu (QMenu)
  reference to the background menu
dirMenu (QMenu)
  reference to the directory menu
dirMultiMenu (QMenu)
  reference to the multiple selection directory menu

#### VcsProjectBrowserHelper.showContextMenu

showContextMenu(menu, standardItems)

Public slot called before the context menu is shown.

It enables/disables the VCS menu entries depending on the overall VCS status and the file status.

menu (QMenu)
  reference to the menu to be shown
standardItems (list of QAction)
  array of standard items that need activation/deactivation depending on the overall VCS status

Raises NotImplementedError:
  to indicate that this method must be implemented by a subclass

#### VcsProjectBrowserHelper.showContextMenuDir

showContextMenuDir(menu, standardItems)

Public slot called before the context menu is shown.

It enables/disables the VCS menu entries depending on the overall VCS status and the directory status.

menu (QMenu)
  reference to the menu to be shown
standardItems (list of QAction)
  array of standard items that need activation/deactivation depending on the overall VCS status

Raises NotImplementedError:
  to indicate that this method must be implemented by a subclass

#### VcsProjectBrowserHelper.showContextMenuDirMulti

showContextMenuDirMulti(menu, standardItems)

Public slot called before the context menu is shown.

It enables/disables the VCS menu entries depending on the overall VCS status and the directory status.

menu (QMenu)
  reference to the menu to be shown
standardItems (list of QAction)
  array of standard items that need activation/deactivation depending on the overall VCS status

Raises NotImplementedError:
  to indicate that this method must be implemented by a subclass

#### VcsProjectBrowserHelper.showContextMenuMulti

showContextMenuMulti(menu, standardItems)

Public slot called before the context menu (multiple selections) is shown.

It enables/disables the VCS menu entries depending on the overall VCS status and the files status.

menu (QMenu)
  reference to the menu to be shown
standardItems (list of QAction)
  array of standard items that need activation/deactivation depending on the overall VCS status

Raises NotImplementedError:
  to indicate that this method must be implemented by a subclass

Up